package com.usian.apis.admin.v1;

import com.usian.model.admin.dtos.ChannelDto;
import com.usian.model.admin.pojos.AdChannel;
import com.usian.model.common.dtos.PageResponseResult;
import com.usian.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * 约束： 约束我的controller具备哪些能力
 */
@Api(value = "频道管理",tags = "Adchannel",description = "频道管理API")
public interface AdChannelControllerApi {
    /**
     * 查询方法 带分页  带查询条件
     * @param channelDto 封装Dto传递请求参数
     * @return 通用返回对象
     */
    @ApiOperation("查询频道信息")
    public PageResponseResult findBySearch(ChannelDto channelDto);

    // 添加  传递对象
    @ApiOperation("保存频道信息")
    public ResponseResult save(AdChannel adChannel);

    // 修改  //1 id  对象
    @ApiOperation("修改频道信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "频道Id",required = true,dataType = "int"),
            @ApiImplicitParam(name = "adChannel",value = "修改的频道对象",required = true,dataType = "adChannel")
    })
    public ResponseResult update(Integer id, AdChannel adChannel);

    // 删除  id
    @ApiOperation("删除频道信息")
    @ApiImplicitParam(name = "id",value = "频道Id",required = true,dataType = "int")
    public ResponseResult deleteById(Integer id);

    /**
     * 根据Id查询对象
     * @param id
     * @return
     */
    @ApiOperation("根据Id查询频道信息")
    public ResponseResult findOne(Integer id);


    /**
     * 查询所有频道
     * @return
     */
    public ResponseResult findAll();

}
